// 采购请求封装
import instance from '@/utils/request'

// 进货
const buy = (buy) => {
  return instance.post('/buy/buy_goods', buy)
}

// 商品信息获取
const getGoods = () => {
  return instance.get('/goods/list')
}

// 修改采购订单
const updateBuyInfo = (buy) => {
  return instance.put('/buy/update_buy_info', buy)
}
// 通过审核
export const passApi = (id) => instance.get(`/buy/pass/${id}`)

// 删除采购订单
const deleteBuyInfo = (buy) => {
  return instance.post('/buy/delete', buy)
}

export { buy, getGoods, updateBuyInfo, deleteBuyInfo }
